package DataStorageClasses;

import java.sql.Date;

import org.json.JSONException;
import org.json.JSONObject;

public class Job 
{
	private long jobID;
	private long clientID;
	private double estPrice;
	private double actPrice;
	private double amtPaid;
	private Date expStartDate;
	private Date actStartDate;
	private Date expFinishDate;
	private Date actFinishDate;
	private String streetAd;
	private String city;
	private String province;
	private String busName;
	
	public Job(long job, long client, double estP, double actP, double amtP, Date expSDate, Date actSDate, Date expFDate, Date actFDate,
					String street, String city, String prov, String busName)
	{
		this.jobID = job;
		this.clientID = client;
		this.estPrice = estP;
		this.actPrice = actP;
		this.amtPaid = amtP;
		this.expStartDate = expSDate;
		this.actStartDate = actSDate;
		this.expFinishDate = expFDate;
		this.actFinishDate = actFDate;
		this.streetAd = street;
		this.province = prov;
		this.busName = busName;
		this.city = city;
	}
	
	public long getJobID()
	{
		return jobID;
	}
	
	public long getClientID()
	{
		return clientID;
	}
	
	public double getEstimatedPrice()
	{
		return estPrice;
	}
	
	public double getActualPrice()
	{
		return actPrice;
	}
	
	public double getAmountPaid()
	{
		return amtPaid;
	}
	
	public Date getExpectedStartDate()
	{
		return expStartDate;
	}
	
	public Date getActualStartDate()
	{
		return actStartDate;
	}
	
	public Date getExpectedFinishDate()
	{
		return expFinishDate;
	}
	
	public Date getActualFinishDate()
	{
		return actFinishDate;
	}
	
	public String getStreetAdress()
	{
		return streetAd;
	}
	
	public String getProvince()
	{
		return province;
	}
	
	public String getBusinessName()
	{
		return busName;
	}
	
	public String getCity()
	{
		return city;
	}
	
	public JSONObject getJSONObject() throws JSONException
	{
		JSONObject json = new JSONObject();
		
		json.put("jobID", jobID);
		json.put("clientID", clientID);
		json.put("estPrice", estPrice);
		json.put("actPrice", actPrice);
		json.put("amtPaid", amtPaid);
		json.put("expStartDate", expStartDate);
		json.put("actStartDate", actStartDate);
		json.put("expFinishDate", expFinishDate);
		json.put("actFinishDate", actFinishDate);
		json.put("streetAd", streetAd);
		json.put("city", city);
		json.put("province", province);
		json.put("busName", busName);
		
		return json;
	}
}
